/**
 * 桥梁模块接口列表
 */
import base from "../base"; // 导入接口域名列表
import axios from "../../http/axios"; // 导入http中创建的axios实例

const bridge = {
  //省份查询
  queryBridgeRegion(params) {
    return axios.get(`${base.baseUrl}/bridge_province/queryBridgeRegion`, {
      params: params
    });
  },
  //条件查询桥组
  queryBridgeGroup(params) {
    return axios.get(`${base.baseUrl}/bridge_group/queryBridgeGroup`, {
      params,
      params
    })
  },
  //新增桥组
  addBridgeGroup(params) {
    return axios.post(`${base.baseUrl}/bridge_group/addBridgeGroup`, params)
  },
  //删除桥组
  deleteBridgeGroupById(params) {
    return axios.get(`${base.baseUrl}/bridge_group/deleteBridgeGroupById`, {
      params: params
    })
  },
  //修改桥组
  updateBridgeGroupById(params) {
    return axios.post(`${base.baseUrl}/bridge_group/updateBridgeGroupById`, params)
  },
  //查询所有数据分类
  queryBridgeTypeList(params) {
    return axios.get(`${base.baseUrl}/bridge_type/queryBridgeTypeList`, {
      params: params
    })
  },
  //查询组下所有桥梁
  queryBridgeBasicByParentId(params) {
    return axios.get(`${base.baseUrl}/bridge_basic/queryBridgeBasicByParentId`, {
      params: params
    })
  },
  //桥梁种类
  findDataTypeList(params) {
    return axios.get(`${base.baseUrl}/bridge_kind/findDataTypeList`,{params:params})
  },
  // 新增桥梁
  addBridgeBasic(params) {
    return axios.post(`${base.baseUrl}/bridge_basic/addBridgeBasic`, params)
  },
  //修改桥梁
  updateBridgeBasic(params) {
    return axios.post(`${base.baseUrl}/bridge_basic/updateBridgeBasic`, params)
  },
  //删除桥梁
  removeBridgeBasicById(params) {
    return axios.get(`${base.baseUrl}/bridge_basic/removeBridgeBasicById`, {
      params: params
    })
  },
  //查询桥梁基础信息结构树
  queryBridgeModelTreeById(params) {
    return axios.get(`${base.baseUrl}/bridge_basic/queryBridgeModelTreeById`, {
      params: params
    })
  },
  //查询所有桥联
  queryAllBridgeLink(params) {
    return axios.get(`${base.baseUrl}/bridge_link/queryAllBridgeLink`, {
      params:params
    })
  },
  //新增联
  addBridgeLink(params) {
    return axios.post(`${base.baseUrl}/bridge_link/addBridgeLink`, params)
  },
  // 修改联
  updateBridgeLinkById(params) {
    return axios.post(`${base.baseUrl}/bridge_link/updateBridgeLinkById`, params)
  },
  //删除指定桥梁某桥联
  deleteBridgeLinkById(params) {
    return axios.get(`${base.baseUrl}/bridge_link/deleteBridgeLinkById`, {
      params,
      params
    })
  },
  //条件查询截面
  queryCrossSection(params) {
    return axios.get(`${base.baseUrl}/bridge_cross_section//queryCrossSection`, {
      params: params
    })
  },
  //新增截面
  addBridgeCrossSection(params) {
    return axios.post(`${base.baseUrl}/bridge_cross_section/addBridgeCrossSection`, params)
  },
  //修改截面信息
  updateBridgeCrossSection(params) {
    return axios.post(`${base.baseUrl}/bridge_cross_section/updateBridgeCrossSection`, params)
  },
  //删除桥梁某截面
  deleteBridgeCrossSectionById(params) {
    return axios.get(`${base.baseUrl}/bridge_cross_section/deleteBridgeCrossSectionById`, {
      params: params
    })
  },
  //查询桥梁卡片信息
  queryBridgeCard(params) {
    return axios.get(`${base.baseUrl}/bridge_card/queryBridgeCard` ,{params:params})
  },
  //修改桥梁卡片信息
  updateBridgeCardById(params) {
    return axios.post(`${base.baseUrl}/bridge_card/updateBridgeCardById`, params)
  },
  //新增桥梁卡片信息
  addBridgeCard(params) {
    return axios.post(`${base.baseUrl}/bridge_card/addBridgeCard`, params)
  },
  //根据桥梁id查询卡片
  queryBridgeCardByBridgeId(params) {
    return axios.get(`${base.baseUrl}/bridge_card/queryBridgeCardByBridgeId`, {params:params})
  },
  //查询桥梁构件
  queryBridgeComponents(params) {
    return axios.get(`${base.baseUrl}/bridge_component/queryBridgeComponents`, {params:params})
  },
  //新增桥梁构件
  addBridgeComponent(params) {
    return axios.post(`${base.baseUrl}/bridge_component/addBridgeComponent`, params)
  },
  // 修改桥梁构件
  updateBridgeComponent(params) {
    return axios.post(`${base.baseUrl}/bridge_component/updateBridgeComponent`, params)
  },
  //删除桥梁构件
  deleteBridgeComponent(params) {
    return axios.get(`${base.baseUrl}/bridge_component/deleteBridgeComponent`, {params:params})
  },
  //根据结构类型查询构件
  queryBridgeComponentBystructureModelId(params) {
    return axios.get(`${base.baseUrl}/bridge_component/queryBridgeComponentBystructureModelId`,{params:params})
  },
  //批量新增构件
  addBridgeComponentBatch(params) {
    return axios.post(`${base.baseUrl}/bridge_component/addBridgeComponentBatch`,params)
  },
  // 批量更新测点信息
  batchUpdateDeviceMeasurePoint(params) {
    return axios.post(`${base.baseUrl}/device_measure_point/batchUpdateDeviceMeasurePoint`, params)
  },
  //查询单个桥梁某截面下所有测点
  queryAllDeviceMeasurePointByBridgeIdAndCrossSectionId(params) {
    return axios.get(`${base.baseUrl}/device_measure_point/queryAllDeviceMeasurePointByBridgeIdAndCrossSectionId`,{params,params})
  },
  //新增立面
  addBridgeFacade(params) {
    return axios.post(`${base.baseUrl}/bridge_facade/addBridgeFacade`, params)
  },
  //修改立面信息
  updateBridgeFacadeById(params) {
    return axios.post(`${base.baseUrl}/bridge_facade/updateBridgeFacadeById`,params)
  },
  //查询单个桥梁所有立面
  queryAllBridgeFacade(params) {
    return axios.get(`${base.baseUrl}/bridge_facade/queryAllBridgeFacade`,{params:params})
  },
  //根据桥梁id查询立面
  queryAllBridgeFacedByBridgeId(params){
    return axios.get(`${base.baseUrl}/bridge_facade/queryAllBridgeFacadeByBridgeId`,{params:params})
  },
  //查询所有截面
  queryBridgeCrossSections(params) {
    return axios.get(`${base.baseUrl}/bridge_cross_section/queryBridgeCrossSections`, {params:params})
  },
  //批量更新截面
  batchUpdateBridgeCrossSection(params) {
    return axios.post(`${base.baseUrl}/bridge_cross_section/batchUpdateBridgeCrossSection`,params)
  },
  //查询单个桥梁基础信息
  queryBridgeBasicById(params) {
    return axios.get(`${base.baseUrl}/bridge_basic/queryBridgeBasicById`, {params: params})
  },
  // 设备管理  查询所有桥梁
  AllTheBridges(params={}) {
    return axios.get(`${base.baseUrl}/bridge_basic/queryBridgeBasicList`,{params: params})
  },
  // 设备管理页面

  // 查询桥梁工作站结构树
  BridgesTree() {
    return axios.get(`${base.baseUrl}/device_work_station/queryDeviceTree`)
  },
  // 查询所有工作站
  ListWorkstation() {
    return axios.get(`${base.baseUrl}/device_work_station/queryAllDeviceWorkStation`)
  },
  //查询工作站下设备
  queryAllDevice(params){
    return axios.get(`${base.baseUrl}/device_work_station/queryAllDeviceByWorkStationId`,{params})

  },
  //查询单个桥梁工作站
  getBridgeWorkStation(params){
    return axios.get(`${base.baseUrl}/device_work_station/queryAllDeviceWorkStationByBridgeId`,{params} )
  },
  // 新增工作站
  addWorkstation(params) {
    return axios.post(`${base.baseUrl}/device_work_station/addDeviceWorkStation`, params)
  },
  // 修改工作站
  editWorkstation(params) {
    return axios.post(`${base.baseUrl}/device_work_station/updateDeviceWorkStation`, params)
  },
  // 删除桥梁某工作站
  delWorkstation(params) {
    return axios.get(`${base.baseUrl}/device_work_station/deleteDeviceWorkStationById`, {
      params: params
    })
  },

  // 查询所有采集器设备
  gitListCollector() {
    return axios.get(`${base.baseUrl}/device_collector/queryAllDeviceCollector`)
  },
 // 新增采集器
 addCollector(params) {
  return axios.post(`${base.baseUrl}/device_collector/addDeviceCollector`,params )
},
 // 修改采集器
 editCollector(params) {
  return axios.post(`${base.baseUrl}/device_collector/updateDeviceCollector`,params )
},
 // 删除采集器
 delCollector(params) {
  return axios.get(`${base.baseUrl}/device_collector/deleteDeviceCollectorById`,{params:params} )
},
// 查询所有传感器设备
gitListSensor() {
  return axios.get(`${base.baseUrl}/device_sensor/queryAllDeviceSensor`)
},
//采集器下级设备
getCollectChildren(params){
  return axios.get(`${base.baseUrl}/device_collector/queryAllDeviceSensorByParentId`,{params})
},
//查询传感器设备类型
getTypelist(){
  return axios.get(`${base.baseUrl}/sensor_type/queryAllSensorType`)
},
//新增传感器
addDeviceSensor(params){
  return axios.post(`${base.baseUrl}/device_sensor/addDeviceSensor`,params )
},
 // 修改传感器
 upDeviceSensor(params) {
  return axios.post(`${base.baseUrl}/device_sensor/updateDeviceSensor`,params )
},
 // 删除传感器
 delSensor(params) {
  return axios.get(`${base.baseUrl}/device_sensor/deleteDeviceSensorById`,{params} )
},
  //根据桥梁类型查询结构树
  queryConstructionModelTreeById(params) {
    return axios.get(`${base.baseUrl}/bridge_structure/queryConstructionModelTreeById`, {
      params: params
    })
  },
  //根据桥梁类型查询结构树  到构件
  queryStructuralElementTree(params){
    return axios.get(`${base.baseUrl}/bridge_structure/queryStructuralElementTree`, {
      params: params
    })
  },
  //根据结构查询所有病害
  queryDiseaseByStructureId(params) {
    return axios.get(`${base.baseUrl}/system_disease/queryDiseaseByStructureId`, {
      params: params
    })
  },
  //桥梁档案 分页列表
  queryArchivesList(params) {
    return axios.post(`${base.baseUrl}/bridge_archive/queryByBridgeId`, params)
  },
  //桥梁档案 新增
  addArchivesList(params) {
    return axios.post(`${base.baseUrl}/bridge_archive/add`, params)
  },
  //桥梁档案 编辑
  updateArchivesList(params) {
    return axios.post(`${base.baseUrl}/bridge_archive/update`, params)
  },
  //桥梁档案 删除
  deleteArchivesList(params) {
    return axios.post(`${base.baseUrl}/bridge_archive/delete`, params)
  },
  //桥梁档案 详情
  queryArchivesById(params) {
    return axios.post(`${base.baseUrl}/bridge_archive/queryById`, params)
  },
  //新增数据分类
  addDataType(params) {
    return axios.post(`${base.baseUrl}/system_datatype/addDataType`,params)
  },
  //修改数据分类
  updateDataType(params) {
    return axios.post(`${base.baseUrl}/system_datatype/updateDataType`,params)
  },
  //查询所有一级分类
  queryAllFirstSystemDataType(params) {
    return axios.get(`${base.baseUrl}/system_datatype/queryAllFirstSystemDataType`, {params:params})
  },
  //查询下级数据分类
  queryAllSystemDataTypeByParentId(params) {
    return axios.get(`${base.baseUrl}/system_datatype/queryAllSystemDataTypeByParentId`,{params:params})
  },
  //删除单个数据分类
  deleteSystemDataTypeById(params) {
    return axios.get(`${base.baseUrl}/system_datatype/deleteSystemDataTypeById`,{params:params})
  },

  //查询桥梁模型
  queryBridgeBasicById(params) {
    return axios.get(`${base.baseUrl}/bridge_basic/queryBridgeBasicById`,{params:params})
  },
  //查询模型文件
  getModelFolder(params) {
    return axios.get(`${base.DOWNLOADURL}/api/file/folder`,{params:params})
  },
  // 根据二级分类查询桥梁下测点
  queryAllDeviceMeasurePointBySecondTypeId(params) {
    return axios.get(`${base.baseUrl}/device_measure_point/queryAllDeviceMeasurePointBySecondTypeId`,{params:params})
  },

  // 更新某测点
  updateDeviceMeasurePoint(params) {
    return axios.post(`${base.baseUrl}/device_measure_point/updateDeviceMeasurePoint`,{params})
  },

  //测点详情
  queryAllPointByBridgeId(params) {

     return axios.get(`${base.baseUrl}/device_measure_point/queryAllPointByBridgeId`,{params})
  }

};

export default bridge;
